Fix bug in restarts when using Runge-Kutta time integration#172
Conversation
TestingUsing (The failed decomposition tests are actually fine, we just need to adjust norm tolerances slightly). When checked out at When using these changes, all restart tests pass: |
matthewhoffman
left a comment
There was a problem hiding this comment.
@trhille , thanks for hunting this down. I agree this is quite confusing to think through, but I think I follow it. I believe it relates to this code, which was added to prevent the Albany mesh from being generated unnecessarily:
https://github.com/MALI-Dev/E3SM/blob/develop/components/mpas-albany-landice/src/mode_forward/mpas_li_velocity_external.F#L541-L552
Maybe it's worth adding a comment where the new logic is added pointing to this block of code as being relevant.
If you want to look into this further, you can try temporarily changing the default in Registry for config_always_compute_fem_grid to .true. and the rerunning the test suite without this branch. I think it should then work.
|
@matthewhoffman, that makes sense. Basically the fix is ensuring that |
|
@matthewhoffman @mperego, what is confusing is that But the value of I ran a test with this line commented out to test whether the relevant change is in fact the reset of |
…MaskPrev Remove inadvertent misalignment between the final mask update before the RK loop and setting the baseline values for the masks.
1ed7857 to
759b5e2
Compare
|
@mperego @matthewhoffman, Okay I figured out the root cause and the fix is much simpler than what co-pilot was doing. I'm force-pushing because that old commit is no longer needed. Restarts are now BFB with this change: |
|
@trhille This looks more reasonable. I don't understand the logic and why the CoPilot fis was working, but I can see that delaying updating the masks could be a issue on restart. |
|
@trhille , is this the line that is affected by moving the mask call earlier?
I don't see anything else that would be affected. |
|
@matthewhoffman |
|
With these changes, all |
matthewhoffman
left a comment
There was a problem hiding this comment.
@trhille , thanks for your diligence in getting to the bottom of this one. This solution is simple and makes sense.

Fix restarts when using Runge-Kutta time integration. Recent changes introduced in MALI-Dev PR #166 broke bit-for-bit restarts when using RK integration. These changes restore BFB restarts with RK.